package jdbc;

import java.util.Date;

public class Emp {
	int id;
	String name;
	double sal;
	Date hireDate;
	Dept dept;
	public Emp() {
	}
	public Emp(int id, String name, double sal, Date hireDate, Dept dept) {
		this.id = id;
		this.name = name;
		this.sal = sal;
		this.hireDate = hireDate;
		this.dept = dept;
	}
	public Dept getDept() {
		return dept;
	}
	public void setDept(Dept dept) {
		this.dept = dept;
	}
	public Date getHireDate() {
		return hireDate;
	}
	public void setHireDate(Date hireDate) {
		this.hireDate = hireDate;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public double getSal() {
		return sal;
	}
	public void setSal(double sal) {
		this.sal = sal;
	}
	public String toString() {
		return "id:"+id+",name:"+name+",sal:"+sal+",hireDate:"+hireDate+",deptid:"+dept.id+",deptname:"+dept.name;
	}
}
